package org.zch.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.zch.dao.PublicBannerDAO;
import org.zch.entity.po.PublicBannerPO;
import org.zch.service.PublicBannerService;

import java.util.List;

/**
 * 广场
 */
@Service
public class PublicBannerServiceImpl implements PublicBannerService {

    @Autowired
    private PublicBannerDAO publicBannerDAO;


    @Override
    public List<PublicBannerPO> findAll() {
        return publicBannerDAO.selectList(null);
    }

    @Override
    public Integer addBanner(PublicBannerPO publicBannerPO) {
        return publicBannerDAO.insert(publicBannerPO);
    }

    @Override
    public Integer delBanner(Integer id) {
        return publicBannerDAO.deleteById(id);
    }
}
